<template>
  <div id="side-nav-bar">
    <div class="side-nav-bar-top">
      <div class="user-pic"><img :src="require('assets/images/'+userpic+'.jpg')" alt="未上传头像"></div>
      <div class="username">用户名</div>
      <div class="userplace">班级</div>
    </div>
    <div class="side-nav-bar-bottom">
      <div class="side-item"><slot name="one"/></div>
      <div class="side-item"><slot name="two"/></div>
      <div class="side-item"><slot name="three"/></div>
      <div class="side-item"><slot name="four"/> </div>
    </div>
  </div>
</template>

<script lang="ts">
import {Component , Prop , Vue } from 'vue-property-decorator'
export default class SideNavBar extends Vue{
  // @Prop({
  //   type:String
  // })
  userpic:string='01flower';
}
</script>

<style lang="less" >
#side-nav-bar{
  .side-nav-bar-top{
    width: 100%;
    height: 13rem;
    padding: 2rem;
    .user-pic{
      margin-bottom: 1rem;
      img{
        width: 6rem;
        height: 6rem;
        border-radius: 50%;
        overflow: hidden;
      }
    }
    .username{
      font-size: 1.1rem;
      margin-bottom: .125rem;
    }
    .userplace{
      font-size: .9rem;
      color: #AAAAAA;
    }
  }
  .side-nav-bar-bottom{
    .side-item{
      cursor: pointer;
      display: flex;
      align-items: center;
      width: 100%;
      height: 4rem;
      line-height: 4rem;
      font-size: 1rem;
      color: #AAAAAA;
      img{
        width: 1.5rem;
        margin-left: -1rem;
        margin-right: 0.5rem;
        vertical-align: middle;
      }
    }
    .side-item:hover{
      background-color: #EEEEEE;
    }
  }
}
</style>